package cpr.name.videoenabledwebview.slice;

import cpr.name.videoenabledwebview.ResourceTable;
import cpr.name.videoenabledwebview.VideoEnabledWebView;
import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;

public class MainAbilitySlice extends AbilitySlice {
    private String EXAMPLE_URL = "https://www.baidu.com/";

    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setUIContent(ResourceTable.Layout_ability_main);
        VideoEnabledWebView webView = (VideoEnabledWebView) findComponentById(ResourceTable.Id_webview);
        final String url = EXAMPLE_URL; // EXAMPLE_URL由开发者自定义
        webView.load(url);
    }

    @Override
    public void onActive() {
        super.onActive();
    }

    @Override
    public void onForeground(Intent intent) {
        super.onForeground(intent);
    }
}
